package cn.wsalix.type;

public enum ArticleEnum {
	common("0", "文章"),ad("1", "广告");
	private String code;
	private String title;

	ArticleEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static ArticleEnum findByCode(String code) {
		for (ArticleEnum userKind : ArticleEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
